package model

type IndexConfig struct {
	ConfigId    uint   `json:"configId" gorm:"type:bigint;primary_key;not null;autoIncrement"`
	ConfigName  string `json:"configName" gorm:"type:varchar(50);not null"`
	ConfigType  uint   `json:"configType" gorm:"type:tinyint;not null"`
	GoodsId     uint   `json:"goodsId" gorm:"type:bigint;not null"`
	RedirectUrl string `json:"redirectUrl" gorm:"type:varchar(100);not null"`
	ConfigRank  uint   `json:"configRank" gorm:"type:int;not null"`
	IsDeleted   uint   `json:"isDeleted" gorm:"type:tinyint(4);not null"`
	CreateTime  Time   `json:"createTime" gorm:"type:datetime;not null;default:current_timestamp"`
	CreateUser  uint   `json:"createUser" gorm:"type:int;not null"`
	UpdateTime  Time   `json:"updateTime" gorm:"type:datetime;not null;default:current_timestamp"`
	UpdateUser  uint   `json:"updateUser" gorm:"type:int"`
}

// TableName 自定义表明，不适用默认的mall_users
func (receiver IndexConfig) TableName() string {
	return "tb_newbee_mall_index_config"
}
